package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface OrderDetailMapper {
    /*
    * 批量插入
     */
    void insertBatch(List<OrderDetail> orderDetailList);

    /*
    * 根据订单id查询
     */

    List<OrderDetail> getByOrderId(Long orderId);

    /*
    * 根据订单id取消订单
     */
    @Delete("delete from order_detail where order_id = #{id}")
    void cancelByOrderId(Long id);
}
